*****  ****** 
*********************************
*	Author: Rithika Kumar	    *
*   GOAL: Placebo Analysis 	    *
*   Table A11 Appendix E        * 
*********************************

*** Set Path to "JOP Replication files" folder 


*** 1. Male HH member placebo 

use "DATA FILES TO SHARE/male_placebo_df.dta", clear
est clear 
 reg ME13 non_res, vce(cluster vill_id_num)
 eststo male_hh_naive
  reg ME13 non_res i.GROUPS6 RO5 INCOME i.URBAN i.INCOME5 FM1 NPERSONS , vce(cluster vill_id_num)
   eststo male_hh_controls

reghdfe ME13 i.year did if did_sample ==1, absorb(hhuid) vce(cluster vill_id_num)
   eststo male_hh_fe


reghdfe ME13  i.year did RO5 INCOME i.INCOME5 FM1 NPERSONS  if did_sample==1, absorb(hhuid) vce(cluster vill_id_num)
   eststo male_hh_did_controls

   
**** 2. Female household head placebo  

use "DATA FILES TO SHARE/female_placebo_df.dta", clear
 

 reg ME13 non_res, vce(cluster vill_id_num)
 eststo female_hh_naive
  reg ME13 non_res i.GROUPS6 RO5 INCOME i.URBAN i.INCOME5 FM1 NPERSONS, vce(cluster vill_id_num)
   eststo female_hh_controls
   
   

 reghdfe ME13 i.year did if did_sample==1, absorb(hhuid_using2012_noyr) vce(cluster vill_id_num)
    gen dropped = !e(sample)
	sort hhuid_using2012_noyr dropped
	** here we see that basically 578 "singleton HH are dropped" this could be because of collinearity 
   
   eststo female_hh_did_naive  
   
      
   reghdfe ME13  i.year did RO5 INCOME i.INCOME5 FM1 NPERSONS if did_sample==1, absorb(hhuid) vce(cluster vill_id_num)
      eststo female_hh_did_controls
	  
	  
	  reghdfe ME13 i.year did RO5 INCOME i.INCOME5 FM1 NPERSONS  if did_sample==1 & RO6 ==3, absorb(hhuid) vce(cluster vill_id_num)
   eststo female_hh_did_widow
   
    
     estout male_hh* female_hh* ///
  using "OUTPUT/TABLES/Table_A11.tex", replace ///
    title("DV: Attend Public Meeting") ///
    label  ///
    prehead("\begin{table}[H]" "\small" "\centering" "\caption{Male migration increase autonomy over mobility and finances}" ///
            "\begin{tabular}{lccccccccc}" "\toprule" ///
            "& \multicolumn{4}{c}{\textit{Sample: Male Household Heads}} & \multicolumn{4}{c}{\textbf{Sample: Female Household Heads}}& \multicolumn{1}{c}{\textbf{Widows}}\\" ///
            "&(1)&(2) & (3) & (4) &(5)&(6)&(7) & (8) & (9)\\" "\hline" "\hline") ///
    posthead("") keep(non_res did 1.year) varlabels(non_res "Migrant in Household"  1.year "Wave 2" did  "Migrant in HH $\times$ Wave 2") ///
	stats(r2_a N, fmt(%9.4f %9.0f) labels("Adj.R2" "Observations")) cells(b(fmt(a2) star) se(par fmt(a2))) starlevels(* 0.10 ** 0.05 *** 0.01) style(tex) collabels(, none) mlabels(, none) ///
    prefoot("\midrule Migrants & I+II& I+II & Only II & Only II& Only II \\" "Estimation & OLS & OLS & DID & DID & DID\\"  "Individual FE & No & No & Yes & Yes & Yes\\" "Controls & No & Yes & No & Yes & Yes\\" "Widows& No & No & No & No& Yes\\"  " \midrule")   nonumber ///
     postfoot( "\bottomrule" "\end{tabular}" "\label{tab:placebo_femalehh}" "\begin{tablenotes}" ///
             "\noindent Notes: Having a migrant within the family does not increase political engagement of female household heads or widows. In each wave, a male household head who lived in a household with at least one migrant was coded as 1 for that given year. Controls for years in current place of residence, age, religion, caste, income, education, farm land and household size are included in Column 2. Column 4 and 5 include controls for age, income, and household size. Source: IHDS I and II " "\end{tablenotes}" "\end{table}")






